<%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2024/4/19
  Time: 18:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <h2>个人工资所得税计算器</h2>
    <form action="calculate.jsp" name="form1">
        税前收入&nbsp;<input type="text" size="20" name="pretax" value=${sessionScope.pretax}><br>
        五险一金&nbsp;<input type="text" size="20" name="fsi" value=${sessionScope.fsi}><br>
        起征点&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" size="20" name="tea" value=${sessionScope.tea}><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="submit" value="计算" onclick="return checkNum();">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="reset" value="重置">
    </form>

    <script>
        function checkNum() {
            if (form1.pretax.value == "" || form1.fsi.value == "" || form1.tea.value == ""){
                window.alert("数据不能为空，请输入...");
                return false;
            }
        }
    </script>

    应缴税额&nbsp;<input type="text" size="20" name="num1" value=${sessionScope.tax}><br>
    税后收入&nbsp;<input type="text" size="20" name="num2" value=${sessionScope.aftertax}><br>

</head>
<body>

</body>
</html>
